/**
 * date:2019/08/16
 * author:Mr.Chung
 * description:此处放layui自定义扩展
 * version:2.0.4
 */

window.rootPath = (function (src) {
    src = document.scripts[document.scripts.length - 1].src;
    return src.substring(0, src.lastIndexOf('/') + 1) + 'lay-module/';
})();

var ver = (function (src) {
    src = document.scripts[document.scripts.length - 1].src;
    var index = src.lastIndexOf('=');
    if (index == -1) {
        return '1.0';
    }
    return src.substring(index + 1);
})();

layui.config({
    base: '/static/js/'
    , version: ver
}).extend({
    miniAdmin: '{/}' + rootPath + 'layuimini/miniAdmin' // layuimini后台扩展
    , miniMenu: '{/}' + rootPath + 'layuimini/miniMenu' // layuimini菜单扩展
    , miniTab: '{/}' + rootPath + 'layuimini/miniTab' // layuimini tab扩展
    , miniTheme: '{/}' + rootPath + 'layuimini/miniTheme' // layuimini 主题扩展
    , step: '{/}' + rootPath + 'step-lay/step' // 分步表单扩展
    , treetable: '{/}' + rootPath + 'treetable-lay/treetable' //table树形扩展
    , treeGrid: '{/}' + rootPath + 'treeGrid/treeGrid' //table树形扩展2
    , tableSelect: '{/}' + rootPath + 'tableSelect/tableSelect' // table选择扩展
    , iconPickerFa: '{/}' + rootPath + 'iconPicker/iconPickerFa' // fa图标选择扩展
    , echarts: '{/}' + rootPath + 'echarts/echarts' // echarts图表扩展
    , echartsTheme: '{/}' + rootPath + 'echarts/echartsTheme' // echarts图表主题扩展
    , layarea: '{/}' + rootPath + 'layarea/layarea' //  省市县区三级联动下拉选择器
    , myCommon: '{/}' + rootPath + 'myCommon/myCommon' //  自定义的通用功能
});
